<?php
$this->breadcrumbs=array(
	'用户'=>array('index'),
	$model->id,
);

$this->menu=array(
	//array('label'=>'我的优惠券', 'url'=>array('couponview')),
	//array('label'=>'我的快递', 'url'=>array('expressview')),
	//array('label'=>'我的订单', 'url'=>array('orderview')),
	//array('label'=>'更改信息', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'所有用户', 'url'=>array('index'), 'visible'=>!Yii::app()->getComponent('admin')->isGuest),
	array('label'=>'新建用户', 'url'=>array('create'), 'visible'=>!Yii::app()->getComponent('admin')->isGuest),
	array('label'=>'删除用户', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?'), 'visible'=>!Yii::app()->getComponent('admin')->isGuest),
	array('label'=>'管理用户', 'url'=>array('admin'), 'visible'=>!Yii::app()->getComponent('admin')->isGuest),
);
?>
<div id="coupons">

    <div id="content" class="coupons-box clear">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>用户信息 <?php echo $model->username; ?></h2>

				</div>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'email',
		'username',
		'realname',
		//'password',
		'gender',
		'mobile',
		'qq',
		'money',
		'zipcode',
		'address',
		array('name'=>'city_id',
				'value'=>date($model->city->name),
		),
		//'enable',
		'manager',
		array('name'=>'create_time',
				'value'=>date('Y年m月d日G时i分s秒', $model->create_time),
		),
	),
)); ?>


				</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
	<div id="sidebar">
		<div class="sbox">
			<div class="sbox-top"></div>
			<div class="sbox-content">
				<div class="side-tip">
					<h2>菜单</h2>
					<p><a href="<?php echo $this->createUrl('user/couponview'); ?>">我的优惠券</a></p>
					<p><a href="<?php echo $this->createUrl('user/expressview'); ?>">我的快递</a></p>
					<p><a href="<?php echo $this->createUrl('user/orderview'); ?>">我的订单</a></p>
					<p><?php echo CHtml::link('更改信息',array('update', 'id'=>Yii::app()->user->id))?></p>
				</div>
			</div>
			<div class="sbox-bottom"></div>
		</div>
	</div>
</div>
